pub fn convert_base(num_str: &str, to_base: u32) -> String {
   let  mut nums=num_str.split("(");
    let num=nums.next().unwrap();
    let base=nums.next().unwrap().split(")").next().unwrap().parse::<u32>().unwrap();
    let mut result=0;
    for c in num.chars(){
        if c>='0' && c<='9'{
            result=result*base+c.to_digit(10).unwrap();
        }
        else if c>='a' && c<='z'{
            result=result*base+c.to_digit(36).unwrap();
        }
        else if c>='A' && c<='Z'{
            result=result*base+c.to_digit(36).unwrap();
        }
    }
    let mut res=String::new();
    while result>0{
        let temp=result%to_base;
        if temp<=9{
            res.push_str(&temp.to_string());
        }
        else if temp>=10 && temp<=35{
            res.push((temp-10+'a' as u32) as u8 as char);
        }
        result=result/to_base;
    }
    res.chars().rev().collect()
}
